package com.bup.gn.model;

import org.springframework.security.core.GrantedAuthority;

import javax.persistence.*;

@Entity
@Table(name = "roles")
@Access(AccessType.FIELD)
public class Role extends BaseEntity implements GrantedAuthority {
    @Column(name = "name", length = 10)
    private String name;

    @Override
    public String getAuthority() {
        return name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
